package com.leyou.service;

import com.leyou.mapper.SpecParamMapper;
import com.leyou.pojo.SpecParam;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SpecParamService {
    @Autowired
    private SpecParamMapper specParamMapper;

    public List<SpecParam> queryParamByid(Long cid,Boolean searching) {
        SpecParam specParam = new SpecParam();
        specParam.setCid(cid);
        if(searching!=null){
            if(searching==true){
                specParam.setSearching(1l);
            }else{
                specParam.setSearching(0l);
            }
        }
        List<SpecParam> list = specParamMapper.select(specParam);
        return  list;
    }
}
